﻿{% extends 'base.htm' %}

{% block title %}
留言本 - 九十九滴眼泪小说集 - 扑家
{% endblock %}

{% block article_title %}
留言本
{% endblock %}

{% block content %}
<form action="." method="POST" enctype="multipart/form-data">
  <table>
    {{ form }}
  </table>
  <p><input type="submit" value="发表评论"></p>
</form>
<br>
<table style="width: 100%">
  {% for message in messages %}
  <tr>
    <td bgcolor="#396E8E">{{ message.id }}# 姓名:{{ message.name }} 时间:{{ message.time }}:</td>
  </tr>
  <tr>
    <td>{{ message.content|escape|linebreaks }}</td>
  </tr>
  {% if message.imagefile %}
  <tr>
  <td><img src="{{ message.imagefile.url }}" alt="99tears"></td>
  </tr>
  {% endif %}

  {% if message.savefile %}
  <tr>
  <td><a href="{{ message.savefile.url }}" alt="99tears">{{ message.savefile }}</a></td>
  </tr>
  {% endif %}
  <tr>
  <td><br></td>
  <tr>
  {% endfor %}
</table>
{% endblock %}